<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel=stylesheet href="css/style.css" type="text/css">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %>
<title>Fantacalcio | Ruolo: ${role.codRole }</title>
</head>
<body>
	<c:if test="${userInSession == null || userInSession.role.codRole != 'ADMIN'}">
		<c:redirect url="Logout.do"></c:redirect>
	</c:if>
		
	<c:import url="/head.jsp"/>
	
	<c:import url="/menu.jsp"/>
	
	<c:import url="menuRole.jsp"/>
	
	<div class="context">
		<h1> Ruolo: ${role.codRole } </h1>
		<table>
			<tr>
				<td><label class="prop">Id:</label></td>
				<td>${role.id }</td>
			</tr>
			<tr>
				<td><label class="prop">Descrizione:</label></td>	
				<td>${role.descrizione }</td>
			</tr>
			<tr>
				<td><label class="prop">Codice Ruolo:</label></td>
				<td>${role.codRole }</td>
			</tr>
		</table>
		<html:form action="PrepareCRUDRoleAction.do" styleId="formrole">
		<html:hidden property="id" value="${role.id }"/>
		<html:hidden property="codOp" value="modifica"/>
		<div class="bottomS"><html:submit value="Modifica" /></div>
		</html:form>
		<html:form action="ConfermaDeleteRoleAction.do" styleId="formrole">
		<html:hidden property="id" value="${role.id }" />
		<html:hidden property="codOp" value="cancella"/>
		<div class="bottomD"><html:submit value="Cancella"  onclick="return confirm('Confermare cancellazione?');"/></div>
		</html:form>
	</div>
	
	<c:import url="/footer.jsp"/>

</body>
</html>